const state = {
  menus: [],    // 原始菜单
}

const getters = {
  menus: state => state.menus,
}

const mutations = {
  SET_MENU: (state, menus) => {
    state.menus = menus || []
  }
}

const actions = {
  setMenu: (context, menus) => context.commit('SET_MENU', menus)
}

export default {
  state,
  getters,
  mutations,
  actions
}
